<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>高压氧舱消毒记录列表</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" />
    <style>
        .recording-header {
            display: -webkit-flex;
            display: flex;
            justify-content: space-around;
            padding: 5px 0;
        }

        .recording-header>div {
            width: 33%;
            text-align: center;
            font-size: 16px;
        }

        .middle-wrapper>.middle-wrapper-body {
            display: -webkit-flex;
            display: flex;
            justify-content: space-around;
            padding: 2px 0;
        }

        .middle-wrapper>.middle-wrapper-body>div {
            width: 20%;
            height: 20px;
            line-height: 20px;
            font-size: 14px;
            text-align: center;
        }

        .middle-wrapper>.middle-wrapper-body>div:nth-child(1) {
            text-align: right;
            padding-right: 30px;
            box-sizing: border-box;
        }

        .recording-wrapper {
            width: 85%;
            border-radius: 10px;
            background-color: #fff;
            -moz-box-shadow: 1px 4px 20px #C2C2C2;
            -webkit-box-shadow: 1px 4px 20px #C2C2C2;
            box-shadow: 1px 4px 20px #C2C2C2;
            padding: 10px 0;
            margin: 20px auto;
        }

        #app {
            padding-top: 10px;
        }

        .font-color {
            color: #666 !important;
        }

        .images {
            width: 20px;
            height: 20px;
            vertical-align: middle;
        }
    </style>
</head>

<body>
    <main id="app">
        <section class="recording-container" id="HoDisinfectionRecord">
            <!-- HoDisinfectionRecord -->
            <div class="recording-wrapper" >

                <div class="recording-header">
                    <div>
                        <span><img class="images" src="../image/rili.png">日期</span>
                    </div>
                    <div>
                        <span><img class="images" src="../image/time3.png">时间</span>
                    </div>
                    <div>
                        <span><img class="images" src="../image/qianzi.png">签字</span>
                    </div>
                </div>
                <div class="recording-header"
                    style="padding-bottom: 0.2rem;border-bottom: 1px solid #ddd;margin-bottom: 0.3rem">
                    <div>
                        <span class="font-color">shijian</span>
                    </div>
                    <div>
                        <span class="font-color">riqi</span>
                    </div>
                    <div>
                        <span class="font-color">yonghuming</span>
                    </div>
                </div>
                <div class="middle-wrapper">
                    <div class="middle-wrapper-body">
                        <div>
                            <span>正舱：</span>
                        </div>
                        <div class="font-color">
                            <span>通风</span>
                            <span>✔</span>
                        </div>
                        <div class="font-color">
                            <span>地面</span>
                            <span>✔</span>
                        </div>
                        <div class="font-color">
                            <span>舱壁</span>
                            <span>✔</span>
                        </div>
                        <div class="font-color">
                            <span>台面</span>
                            <span>✔</span>
                        </div>
                    </div>
                </div>
                <div class="middle-wrapper">
                    <div class="middle-wrapper-body">
                        <div>
                            <span>副舱：</span>
                        </div>
                        <div class="font-color">
                            <span>通风</span>
                            <span>✔</span>
                        </div>
                        <div class="font-color">
                            <span>地面</span>
                            <span>✔</span>
                        </div>
                        <div class="font-color">
                            <span>舱壁</span>
                            <span>✔</span>
                        </div>
                        <div class="font-color">
                            <span>台面</span>
                            <span>✔</span>
                        </div>
                    </div>
                </div>

                <div class="middle-wrapper">
                    <div class="middle-wrapper-body">
                        <div>
                            <span>过渡舱：</span>
                        </div>
                        <div class="font-color">
                            <span>通风</span>
                            <span>✔</span>
                        </div>
                        <div class="font-color">
                            <span>地面</span>
                            <span>✔</span>
                        </div>
                        <div class="font-color">
                            <span>舱壁</span>
                            <span>✔</span>
                        </div>
                        <div class="font-color">
                            <span>台面</span>
                            <span>✔</span>
                        </div>
                    </div>
                </div>

            </div>
        </section>
    </main>
</body>

</html>

<script src="../script/api.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/vue.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/jquery.min.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/ToConfigure.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-toast.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-dialog.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-tab.js" charset="utf-8" type="text/javascript"></script>
<script type="text/javascript">
    //调用vue中的过滤器，固定第一个参数为传入的要处理的数据data
    //Vue.filter('过滤器的名称',function(data){});
    //进行时间的格式化
    Vue.filter('dateFormat', function (dateStr, time) {
        //得到特定的时间
        var date = new Date(dateStr);
        var year = date.getFullYear();
        //ES6语法填充：var month = (date.getMonth()+1).toString().padStart(2, '0');
        var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
        var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
        var hh = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
        var mm = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
        var ss = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();

        //return `${year}-${month}-${day}`;

        if (time && time.toLowerCase() === 'yyyy-mm-dd') {
            return `${year}-${month}-${day}`;
        } else if (time && time.toLowerCase() === 'hh:mm:ss') {
            return `${hh}:${mm}:${ss}`;
        } else {
            return `${year}-${month}-${day} ${hh}:${mm}:${ss}`;
        }
    });
    apiready = function () {
        var vm = new Vue({
            el: '#app',
            data: {
                searchInfo: '',
                DisinfectionRecord: [], //消毒记录信息
                Url_IP: ""
            },
            created() {
                //获取所属医院IP地址
                var Url_IP = ToConfigure_IP("Gorgeous");
                //定义toast提示框
                var toast = new auiToast();
                //清空页面内容
                $("#HoDisinfectionRecord").html("");
                //拼接字符串
                var HoDisinfectionRecord = "";
                var jsParms = new Object();
                jsParms.currPage = 1;
                $.ajax({
                    url: Url_IP + '/disinfectioninspection/hodisinfectionrecord/getHoDisinfectionRecord',
                    type: 'post',
                    async: false,
                    contentType: "application/json",
                    dataType: "json",
                    data: JSON.stringify(jsParms),
                    success: function (result) {
                        /**
                         * 验证返回信息是否为空
                         */
                        if (result.success == true) {
                            /**
                             *  循环object
                             */
                            $.each(result.data.list, function (i, o) {
                                
                                HoDisinfectionRecord += "<div class='recording-wrapper' >";
                                HoDisinfectionRecord += "<div class='recording-header'>";
                                HoDisinfectionRecord += "<div>";
                                HoDisinfectionRecord += "<span><img class='images' src='../image/rili.png'>日期</span>";
                                HoDisinfectionRecord += "</div>";
                                HoDisinfectionRecord += "</div>";
                                HoDisinfectionRecord += "<div class='recording-header' style='padding-bottom: 0.2rem;border-bottom: 1px solid #ddd;margin-bottom: 0.3rem'>";
                                HoDisinfectionRecord += "<div><span class='font-color'>" + o.drTime + "</span> </div>";
                                HoDisinfectionRecord += "</div>";
                                HoDisinfectionRecord += "<div class='middle-wrapper'><div class='middle-wrapper-body'><div><span>主舱：</span></div><br>";
                                if (o.drMcVentilation == 1) {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>通风：✔</span>";
                                    HoDisinfectionRecord += "</div>";
                                } else {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>通风：✖</span>";
                                    HoDisinfectionRecord += "</div>";
                                }
                                if (o.drMcGround == 1) {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>地面：✔</span>";
                                    HoDisinfectionRecord += "</div>";
                                } else {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>地面：✖</span>";
                                    HoDisinfectionRecord += "</div>";
                                }
                                if (o.drMcBulkhead == 1) {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>舱壁：✔</span>";
                                    HoDisinfectionRecord += "</div>";
                                } else {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>舱壁：✖</span>";
                                    HoDisinfectionRecord += "</div>";
                                }
                                if (o.drMcMesa == 1) {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>台面：✔</span>";
                                    HoDisinfectionRecord += "</div>";
                                } else {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>台面：✖</span>";
                                    HoDisinfectionRecord += "</div>";
                                }
                                HoDisinfectionRecord += "</div></div>"
                                HoDisinfectionRecord += "<div class='middle-wrapper'><div class='middle-wrapper-body'><div><span>副舱：</span></div><br>";
                                if (o.drAcVentilation == 1) {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>通风：✔</span>";
                                    HoDisinfectionRecord += "</div>";
                                } else {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>通风：✖</span>";
                                    HoDisinfectionRecord += "</div>";
                                }
                                if (o.drAcGround == 1) {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>地面：✔</span>";
                                    HoDisinfectionRecord += "</div>";
                                } else {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>地面：✖</span>";
                                    HoDisinfectionRecord += "</div>";
                                }
                                if (o.drAcBulkhead == 1) {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>舱壁：✔</span>";
                                    HoDisinfectionRecord += "</div>";
                                } else {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>舱壁：✖</span>";
                                    HoDisinfectionRecord += "</div>";
                                }
                                if (o.drAcMesa == 1) {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>台面：✔</span>";
                                    HoDisinfectionRecord += "</div>";
                                } else {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>台面：✖</span>";
                                    HoDisinfectionRecord += "</div>";
                                }
                                HoDisinfectionRecord += "</div></div>"
                                HoDisinfectionRecord += "<div class='middle-wrapper'><div class='middle-wrapper-body'><div><span>过度舱：</span></div><br>";
                                if (o.drTcVentilation == 1) {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>通风：✔</span>";
                                    HoDisinfectionRecord += "</div>";
                                } else {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>通风：✖</span>";
                                    HoDisinfectionRecord += "</div>";
                                }
                                if (o.drTcGround == 1) {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>地面：✔</span>";
                                    HoDisinfectionRecord += "</div>";
                                } else {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>地面：✖</span>";
                                    HoDisinfectionRecord += "</div>";
                                }
                                if (o.drTcBulkhead == 1) {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>舱壁：✔</span>";
                                    HoDisinfectionRecord += "</div>";
                                } else {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>舱壁：✖</span>";
                                    HoDisinfectionRecord += "</div>";
                                }
                                if (o.drTcMesa == 1) {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>台面：✔</span>";
                                    HoDisinfectionRecord += "</div>";
                                } else {
                                    HoDisinfectionRecord += "<div class='font-color'>";
                                    HoDisinfectionRecord += "<span>台面：✖</span>";
                                    HoDisinfectionRecord += "</div>";
                                }
                                HoDisinfectionRecord += "</div></div></div>";
                            });
                            //页面赋值
                            $("#HoDisinfectionRecord").html(HoDisinfectionRecord);
                        }
                    }
                })
            }

        })
    }
</script>